/*Copyright (C) 2013 by Osama Abdelkhaleq, Andrew Foxworth, Jasmine Griffiths, Kyle Kenik

 * -----------------------------------------------------------------------------------------
 * 
 * This file is part of
 * 
 * MovSimDroid.
 * 
 * MovSimDroid is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * MovSimDroid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MovSim. If not, see <http://www.gnu.org/licenses/>
 * or <http://www.movsim.org>.
 * 
 * -----------------------------------------------------------------------------------------
 */
package org.movsim.movdroid;

//import android.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class StartMenu extends Activity {
    // Initializing variables
    EditText inputName;
    EditText inputEmail;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.start_menu);
        
        Button btnStart = (Button) findViewById(R.id.startbutton);
        Button btnAbout = (Button) findViewById(R.id.aboutbutton);
        Button btnExit = (Button) findViewById(R.id.exitbutton);
        inputName=(EditText)findViewById(R.id.initials);
        // Start the main MovSim application (Go to traffic intersection screen)
        btnStart.setOnClickListener(new View.OnClickListener() {
 
            public void onClick(View arg0) {
                //Starting a new Intent
                Intent mainScreen = new Intent(getApplicationContext(), MovSimDroidActivity.class);
                mainScreen.putExtra("initials",inputName.getText().toString());
                startActivity(mainScreen);
 
            }
        });
        
        // Go to the MovSim instructions screen
        btnAbout.setOnClickListener(new View.OnClickListener() {
        	 
            public void onClick(View arg0) {
                //Starting a new Intent
                Intent aboutScreen = new Intent(getApplicationContext(), InstructionsScreen.class);
 
                startActivity(aboutScreen);
 
            }
        });
        
     // Artificially exit the application
        btnExit.setOnClickListener(new View.OnClickListener() {
        	 
            public void onClick(View arg0) {
                finish();
 
            }
        });
        
    }
}
